﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Web;
using Churchtoolkit.DataAccess.Entities;
using Churchtoolkit.Utils.Authentication;
using Churchtoolkit.Web.Shell.Services;

namespace Churchtoolkit
{
    public static class AuthenticationExtention
    {
        //[DebuggerStepThrough]
        public static SecureMemberDto GetCurrentMember(this IAuthentication authentication)
        {
            AuthenticationService authenticationService = authentication as AuthenticationService;
            if (authenticationService == null)
                return null;
            return authenticationService.CurrentLogedInMemberDto;
        }
    }
}
